/*
 * @Author: hongbin
 * @Date: 2022-10-14 13:42:07
 * @LastEditors: hongbin
 * @LastEditTime: 2022-10-22 13:20:05
 * @Description: 辉光 效果
 */

varying vec2 vUv;
varying vec3 vPosition;
uniform sampler2D texture1;
uniform float time;
uniform float v1;
uniform float v2;
uniform float v3;
uniform float v4;
uniform float GeometryWidth;
uniform float GeometryHeight;
uniform float GeometryDepth;

float PI = 3.14;

/**
* 思路
* 距离中心越远越模糊
* 将每个像素分开
* 越远越小 越暗
*/

void main() {
    vUv = uv;
    vPosition = position;
    vec3 glPosition = position;
    glPosition += 0.001;
    glPosition *= 2.;
    if(position.x > 0. && position.y > 0.) {
        glPosition *= uv.x;
    }

    gl_Position = projectionMatrix * modelViewMatrix * vec4(glPosition, 1.);
}